package ThreadDemo;

public class ThreadEX extends Thread {
    @Override
    public void run(){//A先开始运行，进行完以后让出执行权。然后重新和B抢执行权
        for (int i = 1; i < 30; i++) {
            System.out.println(getName()+"@"+i);
           // Thread.yield();//线程让步
            //
        }
    }
}
